<?php
class Default_Form_Contact extends Zend_Form{
    
    public function init(){       
                
        $name=new Zend_Form_Element_Text('contactName');
        $name->setAttrib('placeholder','Name');                
        $name->setRequired(true)->addValidator('NotEmpty')->addFilter('StripTags')->addFilter('StringTrim')
            ->setAttrib('class','form-control')        
            ->removeDecorator('HtmlTag')->removeDecorator('Label');
        
        $email=new Zend_Form_Element_Text('email');
        $email->setAttrib('placeholder','Email');        
        $email->setRequired(true)->addValidator('NotEmpty')->addValidator('EmailAddress')->addFilter('StripTags')->addFilter('StringTrim')
            ->setAttrib('class','form-control')
            ->removeDecorator('HtmlTag')->removeDecorator('Label');                
                    
        $sub=new Zend_Form_Element_Text('subject');
        $sub->setAttrib('placeholder','Subject');                
        $sub->setRequired(true)->addValidator('NotEmpty')->addFilter('StripTags')->addFilter('StringTrim')
            ->setAttrib('class','form-control')                                  
            ->removeDecorator('HtmlTag')->removeDecorator('Label');        
                                                   
        $con=new Zend_Form_Element_Textarea('content');
        $con->setAttrib('placeholder','Your Message Here');                
        $con->setRequired(true)->addValidator('NotEmpty')
            ->setAttrib('class','form-control message')->setAttrib('rows','8')                                          
            ->removeDecorator('HtmlTag')->removeDecorator('Label');
            
        $sm=new Zend_Form_Element_Button('submit');
        $sm->setAttrib('type','submit')->setAttrib('class','btn btn-primary pull-right');
        $sm->setLabel('Signup')
            ->removeDecorator('dtddwrapper');                                         
        
        $this->setDecorators(array(
                                   array('viewScript',
                                   array('viewScript'=>'/template/form_contact.phtml'),
                                )));                        
           
        $this->addElements(array($name,$email, $sub, $con,$sm));
        
                                          
    }
}